//index.js
const app = getApp()

const lunbotu = [{
    id:'1',
    url:'https://636c-cloud1-5geu4yh6dc2fe615-1306520618.tcb.qcloud.la/sweetSnow-images/1.gif?sign=9f863a41d99c18b854a7859a6e9b5847&t=1629271465'
  },
  {
    id:'2',
    url:'https://636c-cloud1-5geu4yh6dc2fe615-1306520618.tcb.qcloud.la/sweetSnow-images/2.gif?sign=2b1dbb4f162e96414e72d43ff493c6d0&t=1629271486'
  },
  {
    id:'3',
    url:'https://636c-cloud1-5geu4yh6dc2fe615-1306520618.tcb.qcloud.la/sweetSnow-images/1628853153904.jpg?sign=e86f8e55066a6ca1ea946333cf2bbeca&t=1629271535'
  },  
  {
    id:'4',
    url:'https://636c-cloud1-5geu4yh6dc2fe615-1306520618.tcb.qcloud.la/sweetSnow-images/1629249399803.gif?sign=c3b9ddf81545331e288293029664c163&t=1629271560'
  },
  {
    id:'5',
    url:'https://636c-cloud1-5geu4yh6dc2fe615-1306520618.tcb.qcloud.la/sweetSnow-images/1629254252625.gif?sign=64ede0b833b962c8e8b70db933a30053&t=1629271578'
  }
]

Page({
  data: {
    lunbotu,
    // indicatorDots: true,  // 显示面板指示点
    autoplay: true,  // 页面自动切换
    interval: 5000,  // 自动切换时间间隔
    duration: 500,   // 滑动动画时长
    circular: true,
    SelectNav: [],
    score: 300
  },
  
  Ordering(){
    wx.navigateTo({
      url: '../order/order',
    })
  },
  score(){
    wx.navigateTo({
      url: '../score/score',
    })
  },
  CDkey(){
    wx.navigateTo({
      url: '../CDkey/CDkey',
    })
  },
  Coupon() {
    wx.navigateTo({
      url: '../coupon/coupon',
    })
  },
  onPullDownRefresh(){
    console.log('----------')
    setTimeout(()=> {   // 设定一个定时器。在定时到期以后执行注册的回调函数
      wx.stopPullDownRefresh()
    }, 1000)
  },

  onLoad: function (options) {
    wx.setStorageSync('score', this.data.score)
  },
  onShow: function (options) {
    let score=wx.getStorageSync('score');
    this.setData({
      score
    })
  },

})


